{%include file="m.index.header.tpl.php"%}
<!--主体部分-->
<div class="container" style="margin-top:70px;">
	<form action="" method="get">
  <div class="row" style="margin-top:10px;">
    <div class="col-sm-12 distance hierarchy" >
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">教师名称:</label>
        <div class="col-sm-10">
          <input name="q" id="staff_name" type="text" class="form-control" value="" autocomplete="off" >
          <input name="staff_id" id="staff_id" type="hidden" class="form-control" value="">
        </div>
      </div>
    </div>
    <div class="col-xs-12 distance hierarchy2">
      <div class="form-group  text-center" style="padding-top:0px;">
	    <input name="a" type="hidden" class="form-control" value="syllabus.staffinfo">
        <button type="submit" class="btn btn-success absolutely ">搜索</button>
      </div>
    </div>
  </div>
	</form>
  <div class="row row_margin"> 
    <!--   <h4 class="text-center">2012级高一二班单周课程表</h4>-->
    <table class="table table-bordered  text-center">
       <tr>
		 <td>节次</td>
		 {%foreach from=$week_lists key=key item=value%}
		 <td>{%$value%}</td>
		 {%/foreach%}
	  </tr>
	  {%foreach from=$out_am key=key item=value%}
	  <tr>
			 <td>{%$key%}</td>
			 {%foreach from=$value key=k item=v%}
			 <td>
				 {%$v.subject_name%}<br/>{%$v.class_name%}
			 </td>
			 {%/foreach%}
	 </tr>
	 {%/foreach%}
	  <tr>
			<td></td>
	  </tr>
	  {%foreach from=$out_pm key=key item=value%}
	  <tr>
			 <td>{%$key%}</td>
			 {%foreach from=$value key=k item=v%}
			 <td>
				 {%$v.subject_name%}<br/>{%$v.class_name%}
			 </td>
			 {%/foreach%}
	 </tr>
	 {%/foreach%}
    </table>
  </div>
  <!--row  end--> 
  
  <!--  <div class="row row_margin" > 
        <button type="button" class="btn btn-primary btn-lg btn-block btn-primary2">确定</button>
        </div>--> 
</div>
<!--container  end--> 
<!--主体部分  end--> 
<!--底部-->
{%include file="m.index.footer.tpl.php"%} 
<!--日历--> 
<script src="static/js/run_prettify.js"></script>
<script src="static/js/jquery.mockjax.js"></script>
<script src="static/js/bootstrap-typeahead.js"></script>
 <script>
		$(function() {
			function displayResult(item) {
				$("#staff_id").val(item.value);
			}
			$('#staff_name').typeahead({
        source: [
			{%foreach from=$staff_lists key=key item=value%}
            { id: {%$value.staff_id%}, name: '{%$value.staff_name%}' },
			{%/foreach%}
        ],

				onSelect: displayResult,
			});
		  
		});
</script>
